﻿<UserControl x:Class="LiSAClient.WpfClient.View.Frame.Menus.LeftMenuItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="50" d:DesignWidth="230">
    <UserControl.InputBindings>
        <MouseBinding Gesture="LeftClick" Command="{Binding ActivateMenuCommmand}"/>
    </UserControl.InputBindings>
    <UserControl.Visibility>
        <Binding Path="IsVisible">
            <Binding.Converter>
                <BooleanToVisibilityConverter/>
            </Binding.Converter>
        </Binding>
    </UserControl.Visibility>
    <Border Style="{StaticResource LeftMenuItemBorderStyle}">
        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="20"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Image Grid.Column="1" Source="{Binding Icon}" Style="{StaticResource MenuIconStyle}" />
            <TextBlock Grid.Column="2" Text="{Binding DisplayName}" Style="{StaticResource MenuTitleStyle}"/>
        </Grid>
    </Border>
</UserControl>
